<!DOCTYPE html>
<html>
<head>
<title>统计首页</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- bootstrap -->
<link href="/css/bootstrap/bootstrap.css" rel="stylesheet" />
<link href="/css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
<link href="/css/bootstrap/bootstrap-overrides.css" type="text/css"
	rel="stylesheet" />

<!-- libraries -->
<link href="/css/lib/bootstrap-wysihtml5.css" type="text/css"
	rel="stylesheet" />
<link href="/css/lib/uniform.default.css" type="text/css"
	rel="stylesheet" />
<link href="/css/lib/select2.css" type="text/css" rel="stylesheet" />
<link href="/css/lib/bootstrap.datepicker.css" type="text/css"
	rel="stylesheet" />
<link href="/css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
<link href="/css/lib/jquery.dataTables.css" type="text/css"
	rel="stylesheet" />
<link href="/css/lib/dataTable.css" type="text/css"
	rel="stylesheet" />	

<!-- global styles -->
<link rel="stylesheet" type="text/css" href="/css/layout.css" />
<link rel="stylesheet" type="text/css" href="/css/elements.css" />
<link rel="stylesheet" type="text/css" href="/css/icons.css" />

<!-- this page specific styles -->
<link rel="stylesheet" href="/css/compiled/form-showcase.css"
	type="text/css" media="screen" />

<!-- open sans font -->
<link
	href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800'
	rel='stylesheet' type='text/css' />
	
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

	<!-- navbar -->
	<div class="navbar navbar-inverse">
		<div class="navbar-inner">
			<button type="button" class="btn btn-navbar visible-phone"
				id="menu-toggler">
				<span class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>

			<a class="brand" href="index.html"><img src="/img/logo.png" /></a>

			<ul class="nav pull-right">
				<li class="hidden-phone"><input class="search" type="text" />
				</li>
				<li class="notification-dropdown hidden-phone"><a href="#"
					class="trigger"> <i class="icon-warning-sign"></i> <span
						class="count"></span>
				</a>
					<div class="pop-dialog">
						<div class="pointer right">
							<div class="arrow"></div>
							<div class="arrow_border"></div>
						</div>
						<div class="body">
							<a href="#" class="close-icon"><i class="icon-remove-sign"></i></a>
							<div class="notifications">
								<h3>1条新消息</h3>
								<a href="#" class="item"> <i class="icon-signin"></i> 
									欢迎使用投票系统 <span class="time"><i
										class="icon-time"></i></span>
								</a>
								<div class="footer">
									<a href="#" class="logout">查看所有消息</a>
								</div>
							</div>
						</div>
					</div></li>
				<li class="notification-dropdown hidden-phone"><a href="#"
					class="trigger"> <i class="icon-envelope-alt"></i>
				</a>
					<div class="pop-dialog">
						<div class="pointer right">
							<div class="arrow"></div>
							<div class="arrow_border"></div>
						</div>
						<div class="body">
							<a href="#" class="close-icon"><i class="icon-remove-sign"></i></a>
							<div class="messages">
								<div class="footer">
									<a href="#" class="logout">查看所有信息</a>
								</div>
							</div>
						</div>
					</div></li>
				<li class="dropdown"><a href="#"
					class="dropdown-toggle hidden-phone" data-toggle="dropdown">
						账户信息 <b class="caret"></b>
				</a>
					<ul class="dropdown-menu">
						<li><a href="#">账户详情</a></li>
						<li><a href="#">账户设置</a></li>
						<li><a href="#">账户修改</a></li>
					</ul></li>
				<li class="settings hidden-phone"><a href="#"
					role="button"> <i class="icon-cog"></i>
				</a></li>
				<li class="settings hidden-phone"><a href="/admin/logout"
					role="button"> <i class="icon-share-alt"></i>
				</a></li>
			</ul>
		</div>
	</div>
	<!-- end navbar -->

	<!-- sidebar -->
	<div id="sidebar-nav">
		<ul id="dashboard-menu">
			<li  class="active">
				<div class="pointer">
					<div class="arrow"></div>
					<div class="arrow_border"></div>
				</div> 
				<a href="/vote/statics"> <i class="icon-home"></i> <span>统计首页</span></a>
			</li>
			<li>
				<a href="/vote/create"> <i class="icon-signal"></i> <span>创建投票</span></a>
			</li>
			<li><a class="dropdown-toggle" href="#"> <i
					class="icon-group"></i> <span>用户信息</span> <i
					class="icon-chevron-down"></i>
			</a>
				<ul class="submenu">
					<li><a href="#">用户创建</a></li>
					<li><a href="#">用户信息编辑</a></li>
				</ul></li>
		</ul>
	</div>
	<!-- end sidebar -->


	<!-- main container -->
	<div class="content">
		<div class="container-fluid">
			<div id="pad-wrapper" class="form-page">
				<div class="intr_div">
					<table id="option">
						<thead>
							<tr>
								<th>投票标题</th>
								<th>投票状态</th>
								<th>投票方式</th>
								<th>投票截止日期</th>
								<th>查看统计</th>
							</tr>
						</thead>
						<tbody>
							<tr>
							</tr>
						</tbody>
					</table>
					</div>
				</div>
			</div>
	</div>
	<!-- end main container -->

	<!-- scripts for this page -->
	<script src="/js/wysihtml5-0.3.0.js"></script>
	<script src="/js/pokemon.js"></script>
	<script src="http://code.jquery.com/jquery-latest.js"></script>
	<script src="/js/bootstrap.min.js"></script>
	<script src="/js/bootstrap-wysihtml5-0.0.2.js"></script>
	<script src="/js/bootstrap.datepicker.js"></script>
	<script src="/js/jquery.uniform.min.js"></script>
	<script src="/js/jquery.dataTables.min.js"></script>
	<script src="/js/select2.min.js"></script>
	<script src="/js/theme.js"></script>

	<!-- call this page plugins -->
	<script type="text/javascript">
		
        $(function () {

            // add uniform plugin styles to html elements
            $("input:checkbox, input:radio").uniform();

            // select2 plugin for select elements
            $(".select2").select2({
                placeholder: "Select a State"
            });

            // datepicker plugin
            $('.datepicker').datepicker().on('changeDate', function (ev) {
                $(this).datepicker('hide');
            });

            // wysihtml5 plugin on textarea
            $(".wysihtml5").wysihtml5({
                "font-styles": false
            });
            
            $('#option').DataTable(getCommonPageParam("/vote/getVoteList",{},true,
                    [
                        { "mData": "title"},
                        { "mData": "status"},
                        { "mData": "vmode"},
                        { "mData": "overDateStr"},
                        { "mData": "operation"}
                    ],
                    function(resp){
                        var data = resp.aaData;
                        for(num in data){
                        	var id = data[num].id;
                        	data[num].title = '<a href="/vote/show?voteId='+id+'">'+data[num].title+'</a>';
                            data[num].vmode = (data[num].vmode==0?"单选":"多选")
                            data[num].status = (data[num].status==0?"投票中":"已完成") 
                            data[num].operation = '<a href="/vote/showVoteStatics?voteId='+id+'">查看详情</a>';
                        }
                        return resp;
                    }
                )
            );
            
        });
    </script>
	<div style="display: none">
		<script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540'
			language='JavaScript' charset='gb2312'></script>
	</div>
</body>